explode php all values to int

39

$s = "1,2,3,8,2";
$ints = array_map('intval', explode(',', $s ));
var_dump( $ints );

Comments

Submit
0 Comments